package com.sh.data.engine.application.model.request.integration;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/11 17:07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema
public class DataSourceHDFSSaveRequest extends DataSourceSaveRequest {

    /**
     * hdfs的用户
     */
    private String hdfsUser;

    @NotBlank(message = "服务器不能为空")
    @Schema(description = "服务器")
    private String server;

    @NotNull(message = "端口不能为空")
    @Min(value = 0, message = "端口不能小于0")
    @Max(value = 65535, message = "端口不能大于65535")
    @Schema(description = "端口")
    private Integer port;
}
